package com.dingup.mock.dao.exam;

import com.alibaba.fastjson.JSONObject;
import com.dingup.mock.bean.exam.TsExamRecord;
import org.apache.ibatis.annotations.Mapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * Created by yanggavin on 16/5/24.
 */
@Mapper
public interface TsExamRecordsMapper {
    Boolean add(TsExamRecord tsExamRecord);
    Boolean updateExamSummaryInfo(TsExamRecord tsExamRecord);
    Boolean delete(TsExamRecord tsExamRecord);
    TsExamRecord getById(Integer id);
    List<TsExamRecord> getListByUserId(String userId);
    List<Map<String,Object>> getListByMarkType(String markType);
    List<TsExamRecord> getListByExamContentType(HashMap<String, Object> param);
    List<JSONObject> getListByUserIdList(HashMap<String, Object> param);
    List<String> getAllSubjectName();
    TsExamRecord getByHomeworkInfo(HashMap<String, Object> param);
    TsExamRecord getByHomeworkIdAndNum(HashMap<String, Object> param);
    Boolean exist(String examId);

    /**
     * 通过作业记录ID来获取模考记录数据列表
     * @param homeworkRecordId
     * @return
     */
    List<TsExamRecord> getListByHomeworkRecordId(Integer homeworkRecordId);

    /**
     * 根据考试ID获取考试记录
     * @param examId
     * @return
     */
    TsExamRecord getByExamId(String examId);

    /**
     * User: jun
     * Date: 2017/12/20
     * Desc: 获取学生的托福全套作业模考记录, 用于计算学期报告
     * key studentId, classId;
     */
    List<TsExamRecord> getList4WeekReport(HashMap<String, Object> param);
}
